<template>
  <div>
    <el-table :data="tableData" :columns="tableColumn" :height="400">
      <el-table-column
        v-for="item in tableColumn"
        :key="item.name"
        :label="item.name"
        :prop="item.name"
        min-width="180px"
      >
        <template slot-scope="scope">
          <!-- <image-preview :src="scope.row.image_s" :width="50" :height="50" /> -->
          <img v-if="item.type == 'image'" :src="scope.row[item.name]" style="width: 50px; height: 50px" />
          <el-input v-else-if="item.type == 'textarea'" :value="scope.row[item.name]" type="textarea" :rows="2" />
          <span v-else>{{ scope.row[item.name] }}</span>
        </template>
      </el-table-column>
    </el-table>
    total:{{ tableData.length }}
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  props: {
    item_desc: {
      type: Array,
    },
    tableData: {
      type: Array,
    },
  },
  computed: {
    tableColumn() {
      const aaa = this.item_desc;
      return aaa;
    },
  },
};
</script>

<style>
</style>